package com.chixing.day12.day12_Homework;

import java.time.LocalDateTime;

public class MyOrder {
    private int orderId;
    private String orderNo;
    private Double TotalPrice;
    private LocalDateTime createOrderTime;
    private Customer customer;

    public MyOrder() {
    }

    public MyOrder(int orderId, String orderNo, Double totalPrice, LocalDateTime createOrderTime, Customer customer) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        TotalPrice = totalPrice;
        this.createOrderTime = createOrderTime;
        this.customer = customer;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Double getTotalPrice() {
        return TotalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        TotalPrice = totalPrice;
    }

    public LocalDateTime getCreateOrderTime() {
        return createOrderTime;
    }

    public void setCreateOrderTime(LocalDateTime createOrderTime) {
        this.createOrderTime = createOrderTime;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    @Override
    public String toString() {
        return "订单: " + "\n" +
               " " +" " + "订单ID: " + orderId + "\n" +
                " " +" " +  "订单编号: " + orderNo + "\n" +
                " " +" " +  "总金额: " + TotalPrice + "\n" +
                " " +" " + "下单时间: " + createOrderTime + "\n" +
                " " +" " +  "顾客信息: " + customer + "\n"
                ;
    }
}
